<?php
require_once('../config/auth.php');
require_once('departement.cl.php');
$__CURRENT_PAGE__ = 'departement';
$__TITLE__ = "liste de modification des departements";
$departement = new Departement();
$departements = $departement->getAllDepartements();
 require_once(dirname(__FILE__).'/../config/head.php');
?>
<body>
<?php require_once(dirname(__FILE__).'/../config/menu.php'); ?>
<div class="container">
    <a class="btn btn-success pull-right" href="form.php">Ajouter un département</a>
	<table class="table table-striped" width="500" aling="center">
		<thead>
			<th>Nom</th><th>Abréviation</th>
		</thead>
        <tbody>
        	<?php foreach($departements as $dep):?>
                <tr>
                	<td><?php echo $dep->name?></td><td><?php echo $dep->abreviation?></td><td> <?php echo "<a href='form.php?id=".$dep->id."'>modifier</a>" ?></td>
                </tr>
            <?php endforeach ?>
        </tbody>
	</table>
</div>
</body>
</html>